package com.zmn.plat.services.impl.msg.receive.role.conf;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zmn.plat.model.entity.msg.receive.role.conf.MsgReceiveRoleConf;
import com.zmn.plat.model.entity.msg.receive.role.conf.MsgReceiveRoleConfQuery;
import com.zmn.plat.persistence.interfaces.msg.receive.role.conf.MsgReceiveRoleConfDao;
import com.zmn.plat.services.interfaces.msg.receive.role.conf.MsgReceiveRoleConfService;

@Service
public class MsgReceiveRoleConfServiceImpl implements MsgReceiveRoleConfService {

    @Resource
    MsgReceiveRoleConfDao msgReceiveRoleConfDao;

    @Override
    public MsgReceiveRoleConf findByKey(Integer msgId) {
        return msgReceiveRoleConfDao.findByKey(msgId);
    }

    @Override
    public List<MsgReceiveRoleConf> listPageByQuery(MsgReceiveRoleConfQuery query) {
        int count = countByQuery(query);
        query.setTotalCount(count);
        return msgReceiveRoleConfDao.listPageByQuery(query);
    }

    @Override
    public List<MsgReceiveRoleConf> listByQuery(MsgReceiveRoleConfQuery query) {
        return msgReceiveRoleConfDao.listByQuery(query);
    }

    @Override
    public List<MsgReceiveRoleConf> listAll() {
        return msgReceiveRoleConfDao.listAll();
    }

    @Override
    public Integer countByQuery(MsgReceiveRoleConfQuery query) {
        return msgReceiveRoleConfDao.countByQuery(query);
    }

    @Override
    public Integer updateByKey(MsgReceiveRoleConf msgReceiveRoleConf) {
        return msgReceiveRoleConfDao.updateByKey(msgReceiveRoleConf);
    }

    @Override
    public Integer insert(MsgReceiveRoleConf msgReceiveRoleConf) {
        return msgReceiveRoleConfDao.insert(msgReceiveRoleConf);
    }

    @Override
    public Integer insertBatch(List<MsgReceiveRoleConf> msgReceiveRoleConfs) {
        return msgReceiveRoleConfDao.insertBatch(msgReceiveRoleConfs);
    }

    @Override
    public Integer deleteByKey(Integer msgId) {
        return msgReceiveRoleConfDao.deleteByKey(msgId);
    }

    @Override
    public Integer deleteByMsgId(Integer msgId) {
        return msgReceiveRoleConfDao.deleteByMsgId(msgId);
    }
}